<template>
	<Layout class-name="bgff layout-bg strategy showH">
    <fa-navbar title="旅游攻略"></fa-navbar>
    
    <view class="box">
      <!-- 瀑布流 -->
      <custom-waterfalls-flow :value="list" image-key="image_text" @wapperClick="goDetail"></custom-waterfalls-flow>
    </view>
  </Layout>
</template>

<script>
	export default {
		data() {
			return {
				imgList: [
				  { image: require('@/static/image/404.png'), title: '安徽旅游 | 阜阳最值得去的9个景点', address: '八里河旅游区·阜阳1' },
				  { image: require('@/static/image/label.png'), title: '阜阳颍上管仲老街，灯火璀璨的人间福地，诉说着一代...', address: '八里河旅游区·阜阳2' },
				  { image: require('@/static/image/404.png'), title: '安徽旅游 | 阜阳最值得去的9个景点', address: '八里河旅游区·阜阳1' },
				  { image: require('@/static/image/404.png'), title: '安徽旅游 | 阜阳最值得去的9个景点', address: '八里河旅游区·阜阳1' },
				  { image: require('@/static/image/label.png'), title: '阜阳颍上管仲老街，灯火璀璨的人间福地，诉说着一代...', address: '八里河旅游区·阜阳2' },
				  { image: require('@/static/image/label.png'), title: '阜阳颍上管仲老街，灯火璀璨的人间福地，诉说着一代...', address: '八里河旅游区·阜阳2' },
				],
        page:1,
        isLast:false,
        list:[]
			}
		},
    onLoad(){
      uni.showLoading()
      this.getList()
    },
		methods: {
      linkTo(item){
        console.log('进入详情页', item)
        uni.navigateTo({
          url:'/home/match/detail'
        })
      },
      goDetail(item){
        uni.navigateTo({
          url:'/home/strategy_detail?type=1&id='+item.id
        })
      },
      getList(){
        this.$api.traveMoreListsApi({page: this.page}).then(res=>{
          if(!this.isLast) {
            this.page++;
            this.list = [...this.list, ...res.data.data];
            this.isLast = false;
          }else{
            this.isLast = true;
          }
          uni.hideLoading()
          console.log('this.traveData----------', this.list)
        })
      },
		},
    onPageScroll(e) {
      getApp().setNavFixed(this,e)
    },
    onReachBottom() {
      if(!this.isLast){
        this.getList()
      }
    }
	}
</script>

<style lang="scss" scoped>



</style>
